package com.yy.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yy.entity.Register;
import com.yy.entity.Regiterlist;
import com.yy.query.RegisterQuery;
import com.yy.service.RegisterService;
import com.yy.mapper.RegisterMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 雨
* @description 针对表【register】的数据库操作Service实现
* @createDate 2024-06-07 11:42:25
*/
@Service
public class RegisterServiceImpl extends ServiceImpl<RegisterMapper, Register>
    implements RegisterService{

    @Override
    public IPage<Regiterlist> getPage(RegisterQuery registerQuery) {
        int pageNum= registerQuery.getPageNum();
        int pageSiza= registerQuery.getPageSize();
        Page<Regiterlist> page=new Page<>(pageNum,pageSiza);
        Page<Regiterlist> Rpage=this.baseMapper.getReportQuery(page,registerQuery);
        return Rpage;
    }

    @Override
    public List<Regiterlist> getRertisterUser(int retisterid) {
        List<Regiterlist> rertisterUser = this.baseMapper.getRertisterUser(retisterid);
        return rertisterUser;
    }

    @Override
    public Regiterlist listRegister(int retisterid) {
        Regiterlist regiterlists=this.baseMapper.listRegisterUser(retisterid);
        return regiterlists;
    }

    @Override
    public IPage<Regiterlist> alllistResister(RegisterQuery registerQuery) {
        int pageNum= registerQuery.getPageNum();
        int pageSiza= registerQuery.getPageSize();
        Page<Regiterlist> page=new Page<>(pageNum,pageSiza);
        Page<Regiterlist> page1=this.baseMapper.alllistResister(page,registerQuery);
        return page1;
    }
}




